using System.Data.Entity;
using System.Data.Entity.Infrastructure;
using BootyBay.Models.Mapping;

namespace BootyBay.Models
{
    public partial class BootyBayDBContext : DbContext
    {
        static BootyBayDBContext()
        {
            Database.SetInitializer<BootyBayDBContext>(null);
        }

        public BootyBayDBContext()
            : base("Name=BootyBayDBContext")
        {
			Configuration.ProxyCreationEnabled = false;
        }

        public DbSet<ApplicationInfo> ApplicationInfoes { get; set; }
        public DbSet<ApplicationProcessorArchitecture> ApplicationProcessorArchitectures { get; set; }
        public DbSet<ApplicationPublic> ApplicationPublics { get; set; }
        public DbSet<ApplicationVersionInfo> ApplicationVersionInfoes { get; set; }
        public DbSet<AppOperationRecord> AppOperationRecords { get; set; }
        public DbSet<AppWhiteList> AppWhiteLists { get; set; }
        public DbSet<Category> Categories { get; set; }
        public DbSet<StoreUser> StoreUsers { get; set; }
        public DbSet<AllApplication> AllApplications { get; set; }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Configurations.Add(new ApplicationInfoMap());
            modelBuilder.Configurations.Add(new ApplicationProcessorArchitectureMap());
            modelBuilder.Configurations.Add(new ApplicationPublicMap());
            modelBuilder.Configurations.Add(new ApplicationVersionInfoMap());
            modelBuilder.Configurations.Add(new AppOperationRecordMap());
            modelBuilder.Configurations.Add(new AppWhiteListMap());
            modelBuilder.Configurations.Add(new CategoryMap());
            modelBuilder.Configurations.Add(new StoreUserMap());
            modelBuilder.Configurations.Add(new AllApplicationMap());
        }
    }
}
